package com.demo.zhou.sniper.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.demo.zhou.sniper.module.Biaoqian;
import com.demo.zhou.sniper.module.ColorTable;
import com.demo.zhou.sniper.module.Qunbean;
import com.demo.zhou.sniper.module.Zubean;

import com.demo.zhou.sniper.gen.BiaoqianDao;
import com.demo.zhou.sniper.gen.ColorTableDao;
import com.demo.zhou.sniper.gen.QunbeanDao;
import com.demo.zhou.sniper.gen.ZubeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig biaoqianDaoConfig;
    private final DaoConfig colorTableDaoConfig;
    private final DaoConfig qunbeanDaoConfig;
    private final DaoConfig zubeanDaoConfig;

    private final BiaoqianDao biaoqianDao;
    private final ColorTableDao colorTableDao;
    private final QunbeanDao qunbeanDao;
    private final ZubeanDao zubeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        biaoqianDaoConfig = daoConfigMap.get(BiaoqianDao.class).clone();
        biaoqianDaoConfig.initIdentityScope(type);

        colorTableDaoConfig = daoConfigMap.get(ColorTableDao.class).clone();
        colorTableDaoConfig.initIdentityScope(type);

        qunbeanDaoConfig = daoConfigMap.get(QunbeanDao.class).clone();
        qunbeanDaoConfig.initIdentityScope(type);

        zubeanDaoConfig = daoConfigMap.get(ZubeanDao.class).clone();
        zubeanDaoConfig.initIdentityScope(type);

        biaoqianDao = new BiaoqianDao(biaoqianDaoConfig, this);
        colorTableDao = new ColorTableDao(colorTableDaoConfig, this);
        qunbeanDao = new QunbeanDao(qunbeanDaoConfig, this);
        zubeanDao = new ZubeanDao(zubeanDaoConfig, this);

        registerDao(Biaoqian.class, biaoqianDao);
        registerDao(ColorTable.class, colorTableDao);
        registerDao(Qunbean.class, qunbeanDao);
        registerDao(Zubean.class, zubeanDao);
    }
    
    public void clear() {
        biaoqianDaoConfig.clearIdentityScope();
        colorTableDaoConfig.clearIdentityScope();
        qunbeanDaoConfig.clearIdentityScope();
        zubeanDaoConfig.clearIdentityScope();
    }

    public BiaoqianDao getBiaoqianDao() {
        return biaoqianDao;
    }

    public ColorTableDao getColorTableDao() {
        return colorTableDao;
    }

    public QunbeanDao getQunbeanDao() {
        return qunbeanDao;
    }

    public ZubeanDao getZubeanDao() {
        return zubeanDao;
    }

}
